<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
<title>列表</title>
<link rel="stylesheet" href="/static/layui/css/layui.css" media="all">
<script src="/static/layui/layui.all.js"></script>
<script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>
<script src="/static/js/webutil.js?t=123"></script>
<style type="text/css">
.t_lable{text-align:right;background-color: #F8F8F8}
.t_content{text-align:left}
</style>
</head>
<body>
<div class="layui-fluid">
	<div class="layui-row">
		<form class="layui-form" id="table_form" action="">
		
		<table class="layui-table" lay-size="sm">
		  <tbody>
			<tr>
		  	  <td class="t_lable">返回类型</td>
		      <td class="t_content">
		      	<input type="text" name="module" value="" class="layui-input" lay-verify="required">
		      </td>
		      <td class="t_lable">方法名</td>
		      <td class="t_content">
		      	<input type="text" name="module" value="" class="layui-input" lay-verify="required">
		      </td>
		      <td class="t_lable">方法参数</td>
		      <td class="t_content">
		      	<input type="text" name="module" value="" class="layui-input" lay-verify="required">
		      </td>
		  	</tr>
		  </tbody>
		</table>
		
		<table class="layui-table" lay-size="sm">
		  <tbody>
			<tr>
		  	  <td class="t_lable">sql</td>
		      <td class="t_content">
		      	<input type="text" name="module" value="" class="layui-input" lay-verify="required">
		      </td>
		  	</tr>
		  </tbody>
		</table>
		
		
		
		<table class="layui-table" lay-size="sm">
		  <colgroup>
		    <col width="15%">
		    <col width="35%">
		    <col width="15%">
		    <col width="35%">
		  </colgroup>
		  <tbody>
		  	<input type="hidden" name="dateFlag" value="${table.dateFlag}">
		  	<input type="hidden" name="name" value="${table.name}">
			<tr>
		  	  <td class="t_lable">方法名：</td>
		      <td class="t_content">
		      	<input type="text" name="module" value="" class="layui-input" lay-verify="required">
		      </td>
		      <td class="t_lable">作者</td>
		      <td class="t_content">
		      	<input type="text" name="author" value="" class="layui-input" lay-verify="required">
		      </td>
		  	</tr>
		  	<tr>
		      <td class="t_lable">类名称：</td>
		      <td class="t_content">
		      	<input type="text" name="javaName" value="${table.javaName?cap_first}" class="layui-input" lay-verify="required">
		      </td>
		  	  <td class="t_lable">备注</td>
		      <td class="t_content">
		      	<input type="text" name="remarks" value="${table.remarks!''}" class="layui-input" lay-verify="required">
		      </td>
		  	</tr>
		  </tbody>
		</table>
		
		<table class="layui-table" lay-size="sm">
			<thead>
				<tr>
					<th>字段</th>
					<th>join</th>
					<th>where</th>
					<th>条件字段</th>
					<th>条件</th>
					<th>order by</th>
				</tr>
			</thead>
		  <tbody>
		  	<tr>
			  	<td>
				  	<#list table.columns as column>
				  	<input type="checkbox" checked name="columns[${column_index}].verify" value="${column.javaName}" lay-skin="primary" title="${column.javaName}"><br>
				  	</#list>
			  	</td>
			  	<td>
			  		<input type="text" name="" value="FROM ${table.name!''} a" class="layui-input">
			  	</td>
			  	<td>
			  		<input type="text" name="" value="WHERE" class="layui-input">
			  	</td>
			  	<td>
			  		<#list table.columns as column>
					  	<input type="checkbox" checked name="columns[${column_index}].verify" value="${column.javaName}" lay-skin="primary" title="${column.javaName}"><br>
					  	<select name="searchType" lay-filter="aihao">
				      	<#if column.javaType=='Date'>
				      		<option value="date">between</option>
				      	<#else>
				      		<option value="eq">=</option>
				      		<option value="like">like '%param%'</option>
				      		<option value="like_right">like '%param'</option>
				      		<option value="like_left">like 'param%'</option>
				      		<option value="neq">!=</option>
				      		<option value="isnull">is null</option>
				      		<option value="isnotnull">is not null</option>
				      	</#if>
					    </select>
				  	</#list>
			  	</td>
			  	<td>
			  		<input type="text" name="" value="" class="layui-input">
			  	</td>
		  	</tr>
		  </tbody>
		</table>
		  
		
		
		<table class="layui-table" lay-size="sm">
			<thead>
				<tr>
					<th>字段</th>
					<th>备注</th>
					<th>java类型(长度)</th>
					<th>表单类型</th>
					<th>验证</th>
					<th>是否搜索</th>
					<th>条件</th>
				</tr>
			</thead>
		  <tbody>
		  <#list table.columns as column>
		  	<input type="hidden" name="columns[${column_index}].name" value="${column.name}">
		  	<input type="hidden" name="columns[${column_index}].javaType" value="${column.javaType!''}">
		  	<input type="hidden" name="columns[${column_index}].charLength" value="${column.charLength}">
		  	<input type="hidden" name="columns[${column_index}].nullable" value="${column.nullable}">
			<tr>
		      <td>
		      	<input type="checkbox" checked name="columns[${column_index}].verify" value="${column.javaName}" lay-skin="primary" title="${column.javaName}">
		      </td>
		  	  <td>
		      	<input type="text" name="columns[${column_index}].remarks" value="FROM ${table.name!''} a" class="layui-input" lay-verify="required">
		      </td>
		      <td>
		      	<input type="text" name="columns[${column_index}].remarks" value="" class="layui-input" lay-verify="required">
		      </td>
		      <td>
		      	 <input type="checkbox" checked name="columns[${column_index}].verify" value="${column.javaName}" lay-skin="primary" title="${column.javaName}">
		      </td>
		      <td>
				<select name="columns[${column_index}].searchType" lay-filter="aihao">
		      	<#if column.javaType=='Date'>
		      		<option value="date">between</option>
		      	<#else>
		      		<option value="eq">=</option>
		      		<option value="like">like '%param%'</option>
		      		<option value="like_right">like '%param'</option>
		      		<option value="like_left">like 'param%'</option>
		      		<option value="neq">!=</option>
		      		<option value="isnull">is null</option>
		      		<option value="isnotnull">is not null</option>
		      	</#if>
			    </select>
		      </td>
		      <td>
		      	  <input type="checkbox" name="columns[${column_index}].searchFlag" value="1" lay-skin="primary" title="" checked>
		      </td>
		      <td>
		      	<select name="columns[${column_index}].searchType" lay-filter="aihao">
		      	<#if column.javaType=='Date'>
		      		<option value="date">between</option>
		      	<#else>
		      		<option value="eq">=</option>
		      		<option value="like">like '%param%'</option>
		      		<option value="like_right">like '%param'</option>
		      		<option value="like_left">like 'param%'</option>
		      		<option value="neq">!=</option>
		      		<option value="isnull">is null</option>
		      		<option value="isnotnull">is not null</option>
		      	</#if>
			    </select>
		      </td>
		  	</tr>
		  </#list>
		  </tbody>
		</table>
		<hr>
		<button class="layui-btn layui-btn-sm" lay-submit="" lay-filter="*" style="float: right">
			<i class="layui-icon">&#xe618;</i>保存
		</button>
		<br>
		<br>
		<br>
		</form>
	</div>
</div>
<script type="text/javascript">
	layui.form.render();
	layui.form.on('submit(*)', function(formData) {
		postForm("/developer/generator/save.json");
		return false;
	});
</script>
</body>
</html>